package org.cqu_proj.demo.dao;

import org.cqu_proj.demo.entity.Rating;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RatingRepository extends MongoRepository<Rating, String> {
    List<Rating> findByUserId(int userId);

    Rating findByUserIdAndMovieId(int userId, int movieId); // 新增方法

}